import http from "../http/index";

//获取图形验证码
export function getCaptcha() {
    return http.request({
        url: "/captcha",
        method: "get"
    })
}

//注册短信
export function registerSMS(data: any) {
    return http.request({
        url: "/sms/register",
        method: "post",
        params: data
    })
}

//登录短信
export function loginSMS(data: any) {
    return http.request({
        url: "/sms/login",
        method: "post",
        params: data
    })
}

//注册用户
export function registerAuth(data: any) {
    return http.request({
        url: "/auth/register",
        method: "post",
        params: data
    })
}

//登录
export function loginAuth(data: any) {
    return http.request({
        url: "/auth/login",
        method: "post",
        params: data
    })
}

//退出登录
export function logout() {
    return http.request({
        url: "/auth/logout",
        method: "get",
    })
}

//退出登录
export function refreshToken() {
    return http.request({
        url: "/auth/token/refresh",
        method: "post",
    })
}

//上传图片
export function uploadImg(data: any) {
    return http.request({
        url: "/auth/upload",
        method: "post",
        params: data
    })
}

